<?php

class Application_Model_Kommentar
{
	protected $_id;
	protected $_created;
	protected $_userID;
	protected $_referenzid;
	protected $_referenzobjekt;
	protected $_text;
	protected $_deleted;

	public function __construct (array $options = null)
	{
		if (is_array($options))
		{
			$this->setOptions($options);
		}
	}
	public function setOptions (array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value)
		{
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods))
			{
				$this->$method($value);
			}
		}
		return $this;
	}

	public function __set ($name, $value)
	{
		$method = 'set' . ucfirst($name);
		if (('mapper' == $name) || ! method_exists($this, $method))
		{
			throw new Exception('Invalid auth property');
		}
		$this->$method($value);
	}
	public function getId() {
		return $this->_id;
	}

	public function getCreated() {
		return $this->_created;
	}

	public function getUserID() {
		return $this->_userID;
	}

	public function getReferenzid() {
		return $this->_referenzid;
	}

	public function getReferenzobjekt() {
		return $this->_referenzobjekt;
	}

	public function getText() {
		return $this->_text;
	}

	public function setId($_id) {
		$this->_id = $_id;
	}

	public function setCreated($_created) {
		$this->_created = $_created;
	}

	public function setUserID($_userID) {
		$this->_userID = $_userID;
	}

	public function setReferenzid($_referenzid) {
		$this->_referenzid = $_referenzid;
	}

	public function setReferenzobjekt($_referenzobjekt) {
		$this->_referenzobjekt = $_referenzobjekt;
	}

	public function setText($_text) {
		$this->_text = $_text;
	}
	public function getDeleted() {
		return $this->_deleted;
	}

	public function setDeleted($_deleted) {
		$this->_deleted = $_deleted;
	}


	
}

